@import 'core/mixin';
@import 'core/transition';

@import 'font';
@import 'tooltip';
@import 'switch';

body,
html {
  margin: 0;
  padding: 0;
}

* {
  box-sizing: border-box;
}

::selection {
  background:greenyellow;
}

@include b(popup, '') {
  width: 330px;
  padding-bottom: 15px;

  @include e(banner) {
    content: url('chrome-extension://__MSG_@@extension_id__/assets/banner.svg');
    margin-bottom: 20px;
  }

  @include e(item) {
    display: flex;
    width: 300px;
    box-sizing: border-box;
    margin: 0 auto;
    align-items: center;
    padding: 10px 30px;
    margin-bottom: 15px;
    background: #ffffff;
    color: #555;
    box-shadow: 0 17px 37px -12px rgba(44, 37, 195, 0.24);
    border-radius: 13px;
  }

  @include e(label) {
    font-size: 12px;
    transform: scale(0.9);
    transform-origin: 0 50%;
    flex-grow: 1;
  }

  @include e(translate) {
    display: flex;
    flex-flow: column;
    width: 300px;
    margin: 0 auto;
  }

  @include e(input) {
    display: block;
    width: 100%;
    resize: none;
    border: none;
    margin: 0 auto;
    border-radius: 7px;
    padding: 15px 20px 5px;
    height: 100px;
    background: #f1f1f1;
    @include scroll-bar;

    &:focus {
      outline: none;
    }

    &::-webkit-input-placeholder {
      color: #949494;
    }
  }

  @include e(result) {
    display: flex;
    width: 100%;
    resize: none;
    margin: 0 auto;
    margin-top: 10px;
    border-radius: 7px;
    padding: 15px 20px;
    height: 100px;
    background: $primary;
    overflow: auto;
    color: #fff;
    box-shadow: 0 17px 37px -12px rgba(27, 22, 126, 0.315);
    @include ts;
    @include scroll-bar;

    &:empty {
      color: rgb(67, 108, 241);
      box-shadow: none;
    }
  }

  @include e(content) {
    transform: scale(0.8);
  }

  @include e(footer) {
    display: flex;
    justify-content: center;

    a:focus {
      outline: none;
    }
  }

  @include e(link) {
    display: flex;
    align-items: center;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
    color: #aaa;
    transform: scale(0.7);

    > .__icon {
      color: #444;
      margin-right: 10px;
      transform: scale(1.2);
    }
  }

  @include e(setting) {
    position: absolute;
    z-index: 2;
    top: 10px;
    right: 10px;
    background: #fff;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    box-shadow: 0 17px 37px -10px rgba(26, 18, 163, 0.342);

    > .__icon.__icon {
      color: #444;
      font-size: 15px;
      color: $primary;
      animation: spin 2s linear infinite;
    }
  }

  @include e(button) {
    box-sizing: border-box;
    margin: 30px auto 20px;
    width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 0;
    font-size: 13px;
    background: $primary;
    color: #fff;
    box-shadow: 0 27px 19px -15px rgba(26, 48, 215, 0.57);
    border-radius: 100px;
    cursor: pointer;

    .__icon {
      margin-right: 5px;
      font-size: 14px;
    }
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
